package com.aop;

import com.basemodel.DataResult;
import com.basemodel.Student;
import org.springframework.stereotype.Service;

@Service
public class AopTestService {

    @AuditAnnotation(
            approveContentKey = {"学生姓名", "学生年龄", "学生地址"},
            approveFormId = {RiskControlConstants.DEVELOPER_EMAIL_RANGE,
                    RiskControlConstants.DEVELOPER_EMAIL_TITLE,
                    RiskControlConstants.DEVELOPER_EMAIL_CONTENT},
            approveContentValue = {"#student.name", "#student.age", "#student.address"},
            businessKey = {"#student.id"},
            businessType = RiskControlConstants.BizType.DEVELOPER_EMAIL,
            returnObjectClass = DataResult.class,
            returnObjectStr = "{\"data\":\"\",\"code\":999,\"msg\":\"已提交审批\"}",
            operator = "#student.operator",
            operateType = RiskControlConstants.OperateType.ADD,
            taskName = "发送开发者邮件-新增"
    )
    public DataResult testAopMethod(Student student){
        System.out.println(1111);
        return DataResult.doSuccess("aaa");
    }
}
